repo: Delete a remote's keyring when deleting a remote
authorMatthew Barnes <mbarnes@redhat.com>
Fri, 1 May 2015 14:06:24 +0000 (10:06 -0400)
committerMatthew Barnes <mbarnes@redhat.com>
Wed, 13 May 2015 17:08:48 +0000 (13:08 -0400)
src/libostree/ostree-repo.c

index da671c690add62f6c061cfcfa04f2b806b71015e..d267ae98e37925676272b4b45774b203db8af741 100644 (file)
@@ -915,6 +915,10 @@ impl_repo_remote_delete (OstreeRepo     *self,
         }
     }
 
+  /* Delete the remote's keyring file, if it exists. */
+  if (!ot_ensure_unlinked_at (self->repo_dir_fd, remote->keyring, error))
+    goto out;
+
   ost_repo_remove_remote (self, remote);
 
   ret = TRUE;